/**
 *  hw_chdev.h -
 *
 *  Copyright (C) 2008-2010 ZhangHu
 *  All rights reserved.
 *  E-MAIL: anmnmnly@gmail.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef __DEVS_H__
#define __DEVS_H__

#include "drivers/device.h"


enum MasterIDs
{
	UART_ID,
	IIC_ID,
	RTC_ID,
	TIMER_ID
};

enum SlaveUARTIDs
{
	UART0_ID
};

enum SlaveIICIDs
{
    IIC_EEPROM_ID
};

enum SlaveRTCIDs
{
    RTC0_ID
};

enum TimerIDs
{
    TIMER0_ID
};


// device name that used by application.
#define UART0 "uart0"
#define IIC_EEPROM "AT24C08"
#define RTC "RTC"
#define TIMER0 "TIMER0"


#define DEVICE_NR 255  // Suport to 255 devices.


extern struct chdev_init_func chdev_init_func[DEVICE_NR];
extern uint32 get_device_nr(void);
extern device_init_func *get_device_init_func(void);


#endif

